package com.flejay.dreamrecruiter.tools;

import java.util.ResourceBundle;

/**
 * Classe utilitaire pour lire des fichiers de configuration
 * 
 * @author Victor Fleurant
 *
 */
public final class ConfigReaderTool {

	public static final String FILE_CONFIGURATION_FOLDER = "cfg/";
	public static final String REGEX_CONFIGURATION_FOLDER = "cfg/regex/";
	public static final String FILE_CONFIGURATION_EXTENSION = ".properties";
	public static final String FILE_VERIFICATION_FOLDER = "CVs/Extracted/";
	public static final String SUB_REGEX_CONFIGURATION_FOLDER = "sub_tags/regex/";
	public static final String SUB_CONFIGURATION_FOLDER = "sub_tags/regex/";
	public static final String REGEX_STOPPER_CONFIGURATION_FOLDER = "stopper/";
	public static final String CONFIG_FILE = "config.properties";
	
	private ConfigReaderTool() {
		super();
	}
	
	/**
	 * Lit un fichier de configuration dont le nom est pass� en parametre et renvoi toutes les clefs contenus
	 * 
	 * @param folder
	 * @param configurationFileName
	 * @return
	 */
	public static ResourceBundle readConfiguration(final String folder,final String configurationFileName){
		StringBuffer completeConfigFileName = new StringBuffer().append(folder).append(configurationFileName);
		return ResourceBundle.getBundle(completeConfigFileName.toString());
	}
}
